<?php
$this->breadcrumbs=array(
	'News Entries'=>array('index'),
	$model->name,
);

$this->menu=array(
	array('label'=>'List NewsEntries', 'url'=>array('index')),
	array('label'=>'Create NewsEntries', 'url'=>array('create')),
	array('label'=>'Update NewsEntries', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete NewsEntries', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage NewsEntries', 'url'=>array('admin')),
);

if (file_exists(Yii::app()->createUrl("/").Yii::app()->controller->module->image["url"].$model->image)) {
	$dataImage = $model->image;
} else {
	$dataImage = "no-image.jpg";
}
?>
<div class='dataTables_wrapper'>
	<?php $this->widget('zii.widgets.CDetailView', array(
		'data'=>$model,
		'attributes'=>array(
			array('name'=>'id', 'value'=>$model->id),
			'name',
			'alias',
			'price',
			'special_price',
			'style',
			'quantity',
			//'image',
			array(
				'name'=>'image',
				//'type' => 'image',
				//'value' => Yii::app()->createUrl("/").Yii::app()->controller->module->image["url"].$dataImage,
				//'htmlOptions'=>array('style'=> 'max-width: 100px; max-height: 70px'),
				'type'=>'raw',
				'value'=> CHtml::image(Yii::app()->createUrl("/").Yii::app()->controller->module->image["url"].$model->image,'alt', array('style'=> 'max-width: 100px; max-height: 70px')),
			),
			array(
				'name'=>'catalog_image',
				//'type' => 'image',
				//'value' => Yii::app()->createUrl("/").Yii::app()->controller->module->image["url"].$dataImage,
				//'htmlOptions'=>array('style'=> 'max-width: 100px; max-height: 70px'),
				'type'=>'raw',
				'value'=> CHtml::image(Yii::app()->createUrl("/").Yii::app()->controller->module->image["url"].$model->catalog_image,'alt', array('style'=> 'max-width: 100px; max-height: 70px')),
			),
			'priority',
			'created',
			'modified',
			//'product_date',
			'is_published',
		),
	)); ?>
	<div class='fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix'>
		<?php echo CHtml::link("Manage images for this product", array('/products/manageProductImages/admin/product_id/'.$model->id), array('class'=>'btn btn-inverse'));?>  
		<?php echo CHtml::link("Multi upload images for this product", array('/products/manageUpload?product_id='.$model->id), array('class'=>'btn btn-inverse'));?>  
		<?php echo CHtml::link("Upload an images for this product", array('/products/manageProductImages/create/product_id/'.$model->id), array('class'=>'btn btn-inverse'));?>
	</div>
</div>